-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Support returning default index_options for semantic_text fields when include_defaults is true #129967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support returning default index_options for semantic_text fields when include_defaults is true #129967
Conversation
|
Hi @kderusso, I've created a changelog YAML for you. |
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach looks good overall, I have some follow-up questions about null serialization though.
...ference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextIndexOptions.java
Show resolved
Hide resolved
...nference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
Outdated
Show resolved
Hide resolved
...nference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
Show resolved
Hide resolved
...e/src/yamlRestTest/resources/rest-api-spec/test/inference/10_semantic_text_field_mapping.yml
Outdated
Show resolved
Hide resolved
|
Also, can we add a test showing that |
|
@kderusso This test doesn't cover what I had in mind. I think it would be good to check that if we provide a mapping like: PUT my-index
{
"mappings": {
"properties": {
"dense_inference": {
"type": "semantic_text",
"inference_id": "some_dense_inference_id",
"index_options": {
<BBQ index options that match defaults>
}
}
}
}
}The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the changes!
… include_defaults is true (elastic#129967)
… include_defaults is true (elastic#129967)
This PR fixes an issue from #119967 where the default
index_optionswere not displayed wheninclude_defaultsis set to true.Part of this fix requires serializing the
model_settingsearlier so they're accessible when we're performing serialization checks forindex_options.Here is an example of how to test this: